package com.lamect.job.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import lombok.Data;
import tech.powerjob.client.PowerJobClient;

/**
 * @ClassName：PowerJobConfig
 * @Description：TODO
 * @Author：805786
 * @Date：2025年6月6日上午10:16:21
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "powerjob.worker", ignoreInvalidFields = true)
public class PowerJobConfig {

	/** 接入应用名称 */
	private String appName;
	
	/** 接入密码 */
	private String password;
	
	/** 调度服务器地址 */
	private String serverAddress;
	
	@Bean
    public PowerJobClient powerJobClient() {
		return new PowerJobClient(serverAddress, appName, password);
    }
	
}
